const fallbackDictionary={data_collection_warning:"We use cookies (and other similar technologies) to collect data to improve your shopping experience. ",agree_on_data_collection:"By using our website, you're agreeing to the collection of data as described in our ",privacy_policy:"Privacy Policy",change_preferences:"You can change your preferences at any time",data_collection_preferences:"Website Data Collection Preferences",manage_data_collection_preferences:"Manage Website Data Collection Preferences",use_data_by_cookies:"uses data collected by cookies and JavaScript libraries to improve your shopping experience.",by_using:"By using our website, you're agreeing to our",data_categories_table:"The table below outlines how we use this data by category. To opt out of a category of data collection, select 'No' and save your preferences.",unsaved_changes:"You have unsaved changes",close_without_changes:"You have unsaved changes to your data collection preferences. Are you sure you want to close without saving?"},createDictionary=e=>{const n=e.translations,o=Object.keys(n);return!o.length?n:o.reduce((e,o)=>(e[o.split(".").pop()]=n[o],e),{})},composeTranslations=e=>{if(!e)return fallbackDictionary;const n=createDictionary(JSON.parse(e));return{...fallbackDictionary,...n}},translations=composeTranslations(window.consentManagerTranslations),TRACKING_COOKIE="bc_consent";function injectConsentBanner(){var e=document.createElement("div");e.id="consent-manager",e.style.cssText="position: fixed;left: 0;right: 0;bottom: 0;z-index: 1000; background-color:rgba(255,255,255,0.0)",document.body.appendChild(e)}function injectConsentBannerUpdate(){if(document.getElementById("consent-manager-update-banner"))return;var e=document.createElement("div");e.id="consent-manager-update-banner",e.style.cssText="height: 48px ; background-color: #454545;font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';-moz-osx-font-smoothing: grayscale;-webkit-font-smoothing: antialiased;font-smoothing: antialiased;font-size: 14px;font-weight: 400;letter-spacing: -0.05px;line-height: 48px;",e.innerHTML=''+translations.manage_data_collection_preferences+"",document.body.appendChild(e)}var havePreferences=document.cookie.indexOf("bc_consent")>0;function checkAndLoadScript(e,n=[]){const o=e.dataset.bcCookieConsent;if(void 0===o)return!1;const t=Number(o);if(isNaN(t))return!1;if(n.includes(t)&&"text/plain"===e.type){const n=e.cloneNode(!0);n.type="text/javascript";const o=e.parentElement;e.remove();const t=n.src&&new Promise(e=>{n.onload=()=>{e()}});return o.appendChild(n),t}}function loadAllowedScripts(e){const n=document.querySelectorAll("[data-bc-cookie-consent]"),o=Array.from(n).map(n=>checkAndLoadScript(n,e.allow)).filter(e=>e);Promise.all(o).then(()=>{window.dispatchEvent(new Event("consentScriptsLoaded"))})}injectConsentBanner(),havePreferences&&injectConsentBannerUpdate(),window.consentManagerConfig=function(e){var n=window.consentManagerStoreConfig().AlwaysIncludeScriptsWithConsentTag;const o={functional:2,marketingAndAnalytics:3,advertising:4};function t(e){const n={allow:[],deny:[]},t=e.customPreferences||{};return Object.keys(o).forEach((function(e){const a=o[e];t[e]?n.allow.push(a):n.deny.push(a)})),n}if(n){loadAllowedScripts(t(e.preferences.loadPreferences()))}e.preferences.onPreferencesSaved((function(e){var n=window.consentManagerStoreConfig().improvedConsentManagerEnabled;let o=t(e);fetch("/api/storefront/consent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).then((function(){("function"==typeof triggerConsentUpdatedEvent&&triggerConsentUpdatedEvent(o.allow),n)?(loadAllowedScripts(o),document.cookie.indexOf("bc_consent")>0&&injectConsentBannerUpdate()):document.location.reload(!0)})).catch((function(e){console.log(e)}))}));var a=e.React,r=void 0!==window.consentManagerStoreConfig().privacyPolicyUrl&&null!==window.consentManagerStoreConfig().privacyPolicyUrl&&""!==window.consentManagerStoreConfig().privacyPolicyUrl,i=a.createElement("span",null,translations.data_collection_warning,r?translations.agree_on_data_collection:"",r?a.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",r?".":""),c=translations.change_preferences,s=translations.data_collection_preferences,l=a.createElement("span",null,window.consentManagerStoreConfig().storeName+` ${translations.use_data_by_cookies} `,r?translations.by_using+" ":"",r?a.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",r?". ":"",translations.data_categories_table),d=translations.unsaved_changes,g=translations.close_without_changes;return{container:"#consent-manager",writeKey:void 0===window.consentManagerStoreConfig?"":window.consentManagerStoreConfig.writeKey,shouldRequireConsent:function(){return!havePreferences},bannerContent:i,bannerSubContent:c,bannerBackgroundColor:"#454545",preferencesDialogTitle:s,preferencesDialogContent:l,cancelDialogTitle:d,cancelDialogContent:g,closeBehavior:"dismiss",shouldReload:!1}}; //# sourceMappingURL=consent-manager-config-3013a89bb0485f417056882e3b5cf19e6588b7ba.js.map